//
// Created by ✎﹏ℳ๓独赏 ☆独醉 on 2023/4/13.
//
#include <stdio.h>
int find_max(int a,int b){
    int max=0;
    while((max=a%b)!=0){//while(max=a%b)
        a=b;
        b=max;
    }
    return b;
}
int find_min(int a,int b){
    int min = 0;
    min = a*b/find_max(a,b);
    return min;
}
int main(){
    int i,j;
    scanf("%d%d",&i,&j);
    printf("max:%d\n",find_max(i,j));
    printf("min:%d",find_min(i,j));
    return 0;
}